import http from "@/utils/request";

//查询订单
export const getOrderApi = () => http.post('/order/get_order')

//获取vip产品
export const getVipListApi = () => http.get('/product/get_product', {
    params: {
        category_id: '20210827165510715'
    }
})

//获取商品信息

export const getProductDetailApi = (product_id) => http.get("/product/get_product", {
    params: {
        product_id,

    }
})

//下单

export const preOrderApi = (product_id, quantity) => http.post('/order/pre_order', {
    params: {
        product_id,
        quantity
    }
})

//获取订单详情

export const getOrderDetail = order_id => http.post('/order/get_order', { order_id })

//获取支付地址

export const pay = order_id => http.post('/pay/payment', { order_id })

//查看支付结果

export const queryPayStatus = order_id =>http.get('/order/query_order_status',{
    params:{
        order_id
    }
})